﻿//-------------------------------------------------------------------------------------------------
// <copyright file="Localize.cs" company="Anthony Adam">
// Copyright (c) Anthony Adam 2012. All rights reserved.
// </copyright>
//-------------------------------------------------------------------------------------------------
// ReSharper disable once CheckNamespace
namespace SuperStarRounds
{
  using System.Globalization;
  using System.Resources;
  using System.Threading;

  /// <summary>
  /// General form localization.
  /// </summary>
  public static class Localize
  {
    /// <summary>
    /// Resource Manager for Localised string pulling from localisation files.
    /// </summary>
    private static readonly ResourceManager LocalStrings = 
      new ResourceManager("SuperStarRounds.Localisation.DesignerStrings", typeof(SuperStar).Assembly);

    /// <summary>
    /// The current language for localisation with a default of en_US.
    /// </summary>
    private static string localLang;

    /// <summary>
    /// Gets the form label
    /// </summary>
    public static string FormLabel => LocalStrings.GetString("formLabel");

    /// <summary>
    /// Gets entry in copy buffer text
    /// </summary>
    public static string InfoEntryInBufferText => LocalStrings.GetString("infoEntryInBufferText");

    /// <summary>
    /// Gets entry in copy buffer title
    /// </summary>
    public static string InfoEntryInBufferTitle => LocalStrings.GetString("infoEntryInBufferTitle");

    /// <summary>
    /// Gets formatted entry in copy buffer text
    /// </summary>
    public static string InfoFormattedEntryInBufferText => LocalStrings.GetString("infoFormattedEntryInBufferText");

    /// <summary>
    /// Gets formatted entry in copy buffer title
    /// </summary>
    public static string InfoFormattedEntryInBufferTitle => LocalStrings.GetString("infoFormattedEntryInBufferTitle");

    /// <summary>
    /// Gets name in copy buffer text
    /// </summary>
    public static string InfoNameInBufferText => LocalStrings.GetString("infoNameInBufferText");

    /// <summary>
    /// Gets name in copy buffer title
    /// </summary>
    public static string InfoNameInBufferTitle => LocalStrings.GetString("infoNameInBufferTitle");

    /// <summary>
    /// Gets the button label for Dutch
    /// </summary>
    public static string DutchButtonLabel => LocalStrings.GetString("dutchButtonLabel");

    /// <summary>
    /// Gets the button label for English
    /// </summary>
    public static string EnglishButtonLabel => LocalStrings.GetString("englishButtonLabel");

    /// <summary>
    /// Gets the button label for French
    /// </summary>
    public static string FrenchButtonLabel => LocalStrings.GetString("frenchButtonLabel");

    /// <summary>
    /// Gets the button label for German
    /// </summary>
    public static string GermanButtonLabel => LocalStrings.GetString("germanButtonLabel");

    /// <summary>
    /// Gets the button label for Greek
    /// </summary>
    public static string GreekButtonLabel => LocalStrings.GetString("greekButtonLabel");

    /// <summary>
    /// Gets the button label for Italian
    /// </summary>
    public static string ItalianButtonLabel => LocalStrings.GetString("italianButtonLabel");

    /// <summary>
    /// Gets the button label for Russian
    /// </summary>
    public static string RussianButtonLabel => LocalStrings.GetString("russianButtonLabel");

    /// <summary>
    /// Gets the button label for Spanish
    /// </summary>
    public static string SpanishButtonLabel => LocalStrings.GetString("spanishButtonLabel");

    /// <summary>
    /// Gets diagnostic Office not found
    /// </summary>
    public static string OfficeNotFound => LocalStrings.GetString("officeNotFound");

    /// <summary>
    /// Gets button label for Word
    /// </summary>
    public static string OfficeWord => LocalStrings.GetString("officeWord");

    /// <summary>
    /// Gets button label for Excel
    /// </summary>
    public static string OfficeExcel => LocalStrings.GetString("officeExcel");

    /// <summary>
    /// Gets button label for Open Office Write
    /// </summary>
    public static string OfficeOpenOffice => LocalStrings.GetString("officeOpenOffice");

    /// <summary>
    /// Gets button label for Open Office Worksheet
    /// </summary>
    public static string OfficeOpenOfficeCalc => LocalStrings.GetString("officeOpenOfficeCalc");

    /// <summary>
    /// Gets button label for Load
    /// </summary>
    public static string LoadButtonLabel => LocalStrings.GetString("loadButtonLabel");

    /// <summary>
    /// Gets button label for Save
    /// </summary>
    public static string SaveButtonLabel => LocalStrings.GetString("saveButtonLabel");

    /// <summary>
    /// Gets button label for Show/Hide Advisor - Hide option
    /// </summary>
    public static string HideAdvisorLabel => LocalStrings.GetString("hideAdvisorLabel");

    /// <summary>
    /// Gets button label for Show/Hide Advisor - Show option
    /// </summary>
    public static string ShowAdvisorLabel => LocalStrings.GetString("showAdvisorLabel");

    /// <summary>
    /// Gets tab label - Item
    /// </summary>
    public static string WiFormTitle => LocalStrings.GetString("wiWondrousItem");

    /// <summary>
    /// Gets tab label - Organisation
    /// </summary>
    public static string TabOrganisation => LocalStrings.GetString("tabOrganisation");

    /// <summary>
    /// Gets tab label - Monster
    /// </summary>
    public static string TabMonster => LocalStrings.GetString("tabMonster");

    /// <summary>
    /// Gets tab label - NPC
    /// </summary>
    public static string TabNpc => LocalStrings.GetString("tabNPC");

    /// <summary>
    /// Gets form label - Content Config
    /// </summary>
    public static string CcFormTitle => LocalStrings.GetString("ccFormTitle");

    /// <summary>
    /// Gets content tab label - Content Instructions
    /// </summary>
    public static string CcInstructionsLabel => LocalStrings.GetString("ccInstructionsLabel");

    /// <summary>
    /// Gets content tab label - Books Allowed
    /// </summary>
    public static string CcBooksAllowedLabel => LocalStrings.GetString("ccBooksAllowedLabel");

    /// <summary>
    /// Gets content tab label - Classes Allowed
    /// </summary>
    public static string CcClassesAllowedLabel => LocalStrings.GetString("ccClassesAllowedLabel");

    /// <summary>
    /// Gets form label - Design Advice
    /// </summary>
    public static string DaFormTitle => LocalStrings.GetString("daFormTitle");

    /// <summary>
    /// Gets Spelling Option - Add to personal dictionary
    /// </summary>
    public static string SpellingAddTo => LocalStrings.GetString("spellingAddTo");

    /// <summary>
    /// Gets Spelling Option - Ignore for session
    /// </summary>
    public static string SpellingIgnore => LocalStrings.GetString("spellingIgnore");

    /// <summary>
    /// Gets Wondrous Item Tab Label - Name
    /// </summary>
    public static string WondrousItemTabItemNameLabel => LocalStrings.GetString("wiTabItemNameLabel");

    /// <summary>
    /// Gets Wondrous Item Tab Label - Aura 1
    /// </summary>
    public static string WondrousItemTabAura1Label => LocalStrings.GetString("wiTabAura1Label");

    /// <summary>
    /// Gets Wondrous Item Tab Label - Aura 2
    /// </summary>
    public static string WondrousItemTabAura2Label => LocalStrings.GetString("wiTabAura2Label");

    /// <summary>
    /// Gets Wondrous Item Tab Label - Aura 3
    /// </summary>
    public static string WondrousItemTabAura3Label => LocalStrings.GetString("wiTabAura3Label");

    /// <summary>
    /// Gets Wondrous Item Tab Label - Aura 4
    /// </summary>
    public static string WondrousItemTabAura4Label => LocalStrings.GetString("wiTabAura4Label");

    /// <summary>
    /// Gets Wondrous Item Tab Label - Caster Level
    /// </summary>
    public static string WondrousItemTabCasterLevelLabel => LocalStrings.GetString("wiTabCasterLevelLabel");

    /// <summary>
    /// Gets Wondrous Item Tab Label - Slot
    /// </summary>
    public static string WondrousItemTabSlotLabel => LocalStrings.GetString("wiTabSlotLabel");

    /// <summary>
    /// Gets Wondrous Item Tab Label - Price and Cost
    /// </summary>
    public static string WondrousItemTabPriceNCostLabel => LocalStrings.GetString("wiTabPriceNCostLabel");

    /// <summary>
    /// Gets Wondrous Item Tab Label - Auto Calculation
    /// </summary>
    public static string WondrousItemTabAutoCalcCostInstruction => LocalStrings.GetString("wiTabAutoCalcCostInstruction");

    /// <summary>
    /// Gets Wondrous Item Tab Label - Advisory
    /// </summary>
    public static string WondrousItemTabAdvisoryLabel => LocalStrings.GetString("wiTabAdvisoryLabel");

    /// <summary>
    /// Gets Wondrous Item Tab Label - Weight
    /// </summary>
    public static string WondrousItemTabWeightLabel => LocalStrings.GetString("wiTabWeightLabel");

    /// <summary>
    /// Gets Wondrous Item Tab Label - Price Helper
    /// </summary>
    public static string WondrousItemTabPriceHelperLabel => LocalStrings.GetString("wiTabPriceHelperLabel");

    /// <summary>
    /// Gets Wondrous Item Tab Label - Mark Up Label
    /// </summary>
    public static string WondrousItemTabMarkUpLabel => LocalStrings.GetString("wiTabMarkUpLabel");

    /// <summary>
    /// Gets Wondrous Item Tab Label - Description
    /// </summary>
    public static string WondrousItemTabDescription => LocalStrings.GetString("wiTabDescription");

    /// <summary>
    /// Gets Wondrous Item Tab Label - Creation Feat 1
    /// </summary>
    public static string WondrousItemTabCreationFeat1Label => LocalStrings.GetString("wiTabCreationFeat1Label");

    /// <summary>
    /// Gets Wondrous Item Tab Label - Creation Feat 2
    /// </summary>
    public static string WondrousItemTabCreationFeat2Label => LocalStrings.GetString("wiTabCreationFeat2Label");

    /// <summary>
    /// Gets Wondrous Item Tab Label - Creation Feat 3
    /// </summary>
    public static string WondrousItemTabCreationFeat3Label => LocalStrings.GetString("wiTabCreationFeat3Label");

    /// <summary>
    /// Gets Wondrous Item Tab Label - Spell 1
    /// </summary>
    public static string WondrousItemTabCreationSpell1Label => LocalStrings.GetString("wiTabCreationSpell1Label");

    /// <summary>
    /// Gets Wondrous Item Tab Label - Spell 2
    /// </summary>
    public static string WondrousItemTabCreationSpell2Label => LocalStrings.GetString("wiTabCreationSpell2Label");

    /// <summary>
    /// Gets Wondrous Item Tab Label - Spell 3
    /// </summary>
    public static string WondrousItemTabCreationSpell3Label => LocalStrings.GetString("wiTabCreationSpell3Label");

    /// <summary>
    /// Gets Wondrous Item Tab Label - Spell 4
    /// </summary>
    public static string WondrousItemTabCreationSpell4Label => LocalStrings.GetString("wiTabCreationSpell4Label");

    /// <summary>
    /// Gets Wondrous Item Tab Label - Spell 5
    /// </summary>
    public static string WondrousItemTabCreationSpell5Label => LocalStrings.GetString("wiTabCreationSpell5Label");

    /// <summary>
    /// Gets Wondrous Item Tab Label - Spell 6
    /// </summary>
    public static string WondrousItemTabCreationSpell6Label => LocalStrings.GetString("wiTabCreationSpell6Label");

    /// <summary>
    /// Gets Wondrous Item Tab Label - Formatted Copy
    /// </summary>
    public static string WondrousItemTabFormattedLabel => LocalStrings.GetString("wiTabFormattedLabel");

    /// <summary>
    /// Gets Wondrous Item Tab Label - BB Encoded Copy
    /// </summary>
    public static string WondrousItemTabPaizoBbEntryLabel => LocalStrings.GetString("wiTabPaizoBBEntryLabel");

    /// <summary>
    /// Gets Wondrous Item Tab Label - Name Copy
    /// </summary>
    public static string WondrousItemTabCopyNameLabel => LocalStrings.GetString("wiTabCopyNameLabel");

    /// <summary>
    /// Gets Wondrous Item Tab Label - Word Count
    /// </summary>
    public static string WondrousItemTabWordCountLabel => LocalStrings.GetString("wiTabWordCountLabel");

    /// <summary>
    /// Gets Wondrous Item Tab Label - Safe Word Count
    /// </summary>
    public static string WondrousItemTabSafeWordCountLabel => LocalStrings.GetString("wiTabSafeWordCountLabel");

    /// <summary>
    /// Gets Wondrous Item Tab Label - Copy Entry
    /// </summary>
    public static string WondrousItemTabCopyEntryLabel => LocalStrings.GetString("wiTabCopyEntryLabel");

    /// <summary>
    /// Gets Wondrous Item Tab Label - Copy Formatted
    /// </summary>
    public static string WondrousItemTabCopyFormattedLabel => LocalStrings.GetString("wiTabCopyFormattedLabel");

    /// <summary>
    /// Gets Wondrous Item Tab Name - Basic Details
    /// </summary>
    public static string WondrousItemTabNameBasicDetails => LocalStrings.GetString("wiTabNameBasicDetails");

    /// <summary>
    /// Gets Wondrous Item Tab Name - Aura
    /// </summary>
    public static string WondrousItemTabNameAuraSelection => LocalStrings.GetString("wiTabNameAuraSelection");

    /// <summary>
    /// Gets Wondrous Item Tab Name - Creation Feats
    /// </summary>
    public static string WondrousItemTabNameCreationFeats => LocalStrings.GetString("wiTabNameCreationFeats");

    /// <summary>
    /// Gets Wondrous Item Tab Name - Creation Spells
    /// </summary>
    public static string WondrousItemTabNameCreationSpells => LocalStrings.GetString("wiTabNameCreationSpells");

    /// <summary>
    /// Gets Wondrous Item Tab Name - Creation SKills
    /// </summary>
    public static string WondrousItemTabNameOtherCreation => LocalStrings.GetString("wiTabNameOtherCreation");

    /// <summary>
    /// Gets Application Label - Version
    /// </summary>
    public static string VersionVersion => LocalStrings.GetString("versionVersion");

    /// <summary>
    /// Gets Application Version Type - Alpha
    /// </summary>
    public static string VersionAlpha => LocalStrings.GetString("versionAlpha");

    /// <summary>
    /// Gets Application Version Type - Beta
    /// </summary>
    public static string VersionBeta => LocalStrings.GetString("versionBeta");

    /// <summary>
    /// Gets Application Version Type - Release Candidate
    /// </summary>
    public static string VersionReleaseCandidate => LocalStrings.GetString("versionReleaseCandidate");

    /// <summary>
    /// Gets Application Version Type - Release to Manufacture
    /// </summary>
    public static string VersionReleaseToManufacture => LocalStrings.GetString("versionReleaseToManufacture");

    /// <summary>
    /// Gets Application Version Type - Service Pack
    /// </summary>
    public static string VersionServicePack => LocalStrings.GetString("versionServicePack");

    /// <summary>
    /// Sets Application Base Language for dialogs, labels, etc.
    /// </summary>
    /// <param name="language">xx-xx type Language code to set the application to (resource files must exist), defaults to en-US if empty</param>
    public static void SetLanguage(string language = "")
    {
      localLang = language.Equals(string.Empty) ? "en-US" : language;

      Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo(localLang);
    }
  }
}
